/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"ABC7A41B-A05B-484D-B680-56A39E2EBBCE"}
 */
function onAction(event) {
	application.closeForm('CTACTE')
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"3F3C2FEE-F9BE-4CFE-AB37-BE39B600EAA7"}
 */
function onShow(firstShow, event) {
	//application.updateUI()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"BD2B3B0E-5D9F-43DE-BD19-1F7BD93A4B28"}
 */
function altaTurno(event) {
	controller.newRecord()
	medico_id 			= globals.gUsuario
	paciente_id 		= forms.calendario.pacienteid
	grupo_id 			= globals.gGrupo
	fecha_turno_origen 	= globals.gFecha
	importe 			= 100
	saldo_mov 			= importe
	tipo_movim 			= 1
	databaseManager.saveData(foundset.getRecord(controller.getSelectedIndex()))
}
